public class erweishuzulianxi {
    public static void main(String[] args) {
        int[][] allArr ={
                {22,66,44},
                {77,33,88},
                {25,45,65},
                {11,66,99}
        };
//        int[] arr1 ={22,66,44};
//        int[] arr2 ={77,33,88};
//        int[] arr3 ={25,45,65};
//        int[] arr4 = {11,66,99};
//        allArr[0] = arr1;
//        allArr[1] = arr2;
//        allArr[2] = arr3;
//        allArr[3] = arr4;
        int num = 0;
        int sum = 0;

//        for (int i = 0; i < arr1.length; i++) {
//            num1 = num1 + arr1[i];
//        }
//        for (int i = 0; i < arr1.length; i++) {
//            num2 = num2 + arr2[i];
//        }
//        for (int i = 0; i < arr1.length; i++) {
//            num3 = num3 + arr3[i];
//        }
//        for (int i = 0; i < arr1.length; i++) {
//            num4 = num4 + arr4[i];
//        }
        for (int i = 0; i < allArr.length; i++) {
           num = 0;
            for (int j = 0; j < allArr.length-1; j++) {
                num = num + allArr[i][j];
            }
            System.out.println("第"+(i+1)+"季度的营业额为"+num);
        }
//        System.out.println("第一季度的营业额为"+num1);
//        System.out.println("第二季度的营业额为"+num2);
//        System.out.println("第三季度的营业额为"+num3);
//        System.out.println("第四季度的营业额为"+num4);
        for (int i = 0; i < allArr.length; i++) {
            for (int j = 0; j < allArr.length-1; j++) {
                sum = sum+allArr[i][j];
            }
        }
        System.out.println("全年营业额为"+sum);
    }
}
